
function getList(){
	var p=getQ()
	var data=JSON.parse(p.data)
	document.getElementById("name").textContent=data.class_name+"班习题作业"
	document.getElementById("teacher").textContent="老师："+data.teacher_chinesename
	document.getElementById("class_number").textContent="班级编号："+data.class_number
	jQuery.ajax({
		"url":"/get_student_xitilist/",
		"error":errorAjax,
		"beforeSend":start_load_pic,
		"complete":stop_load_pic,
		"data":{"id":p.id},
		"dataType":"jsonp",
		"success":function(data){
			if(!data.status){
				showErrorInfo(data.content);
				return false;
			}
			else{
				data=data.content
				var tab=document.getElementById("tab");
				for(var i=0;i<data.length;i++){
					var tr=document.createElement("tr")
					var td=document.createElement("td")
					td.textContent=data[i].name;
					tr.appendChild(td)
					
					var td=document.createElement("td")
					td.textContent=data[i].publish_date;
					tr.appendChild(td)
					

					var td=document.createElement("td")
					td.textContent=data[i].status;
					tr.appendChild(td)
					
					var td=document.createElement("td")
					td.textContent=data[i].complete_date;
					tr.appendChild(td)
					
					var td=document.createElement("td")
					var button=document.createElement("button")
					button.className="btn btn-xs btn-danger"
					button.textContent="开始习题作业"
					button.setAttribute("data",JSON.stringify(data[i].ti))
					button.setAttribute("ti_id",JSON.stringify(data[i].ti_id))
					button.setAttribute("name",data[i].name)
					button.onclick=function(){
						var name=this.getAttribute("name")
						var ti_id=this.getAttribute("ti_id")
						window.open ("ti.html?action=edit&s="+this.getAttribute("data")+"&name="+name+"&ti_id="+ti_id, "_blank", "height=800, width=1300, top=160, left=200, toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no");
					}

					td.appendChild(button)
					var button=document.createElement("button")
					button.className="btn btn-xs btn-warning"
					button.textContent="查看评价"
					button.style.marginLeft="5px"
					button.setAttribute("ti_id",JSON.stringify(data[i].ti_id))
					button.onclick=function(){
						var ti_id=this.getAttribute("ti_id")
                                                window.open ("comment.html?type=xiti&model=v&id="+ti_id, "_blank", "height=800, width=1300, top=160, left=200, toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no");
					}
					td.appendChild(button)
				
					
				
					
				
					tr.appendChild(td)
					

					tab.appendChild(tr)

				}
			}
		}
	})
}

getList()
